home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / ncurses-5.3.lha / ncurses-5.3 / progs / Makefile.in < prev    next >
Makefile  |  2002-10-24  |  10KB  |  273 lines

  1. # $Id: Makefile.in,v 1.56 2001/12/08 18:48:01 tom Exp $
  2. ##############################################################################
  3. # Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc.           #
  4. #                                                                            #
  5. # Permission is hereby granted, free of charge, to any person obtaining a    #
  6. # copy of this software and associated documentation files (the "Software"), #
  7. # to deal in the Software without restriction, including without limitation  #
  8. # the rights to use, copy, modify, merge, publish, distribute, distribute    #
  9. # with modifications, sublicense, and/or sell copies of the Software, and to #
  10. # permit persons to whom the Software is furnished to do so, subject to the  #
  11. # following conditions:                                                      #
  12. #                                                                            #
  13. # The above copyright notice and this permission notice shall be included in #
  14. # all copies or substantial portions of the Software.                        #
  15. #                                                                            #
  16. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
  17. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
  18. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
  19. # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
  20. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
  21. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
  22. # DEALINGS IN THE SOFTWARE.                                                  #
  23. #                                                                            #
  24. # Except as contained in this notice, the name(s) of the above copyright     #
  25. # holders shall not be used in advertising or otherwise to promote the sale, #
  26. # use or other dealings in this Software without prior written               #
  27. # authorization.                                                             #
  28. ##############################################################################
  29. #
  30. # Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
  31. #
  32. # Makefile for ncurses source code.
  33. #
  34. # This makes the ncurses utility programs.
  35. #
  36. # The variable 'srcdir' refers to the source-distribution, and can be set with
  37. # the configure script by "--srcdir=DIR".
  38. #
  39. # The rules are organized to produce the libraries for the configured models,
  40. # and the programs with the configured default model.
  41.  
  42. # turn off _all_ suffix rules; we'll generate our own
  43. .SUFFIXES:
  44.  
  45. SHELL        = /bin/sh
  46. THIS        = Makefile
  47.  
  48. CF_MFLAGS     = @cf_cv_makeflags@
  49. @SET_MAKE@
  50. x        = @PROG_EXT@
  51.  
  52. MODEL        = ../@DFT_OBJ_SUBDIR@
  53. DESTDIR        = @DESTDIR@
  54. srcdir        = @srcdir@
  55. prefix        = @prefix@
  56. exec_prefix    = @exec_prefix@
  57. bindir        = @bindir@
  58. libdir        = @libdir@
  59. includedir    = @includedir@
  60. datadir        = @datadir@
  61.  
  62. LIBTOOL        = @LIBTOOL@
  63.  
  64. INSTALL        = @INSTALL@
  65. INSTALL_PROGRAM    = @INSTALL_PROGRAM@
  66. transform    = @program_transform_name@
  67.  
  68. AWK        = @AWK@
  69. LN_S        = @LN_S@
  70.  
  71. CC        = @CC@
  72. CPP        = @CPP@
  73. CFLAGS        = @CFLAGS@
  74.  
  75. INCDIR        = $(srcdir)/../include
  76. CPPFLAGS    = -I../progs -I$(srcdir) @CPPFLAGS@ \
  77.           -DHAVE_CONFIG_H
  78.  
  79. CCFLAGS        = $(CPPFLAGS) $(CFLAGS)
  80.  
  81. CFLAGS_LIBTOOL    = $(CCFLAGS)
  82. CFLAGS_NORMAL    = $(CCFLAGS)
  83. CFLAGS_DEBUG    = $(CCFLAGS) @CC_G_OPT@ -DTRACE
  84. CFLAGS_PROFILE    = $(CCFLAGS) -pg
  85. CFLAGS_SHARED    = $(CCFLAGS) @CC_SHARED_OPTS@
  86.  
  87. CFLAGS_DEFAULT    = $(CFLAGS_@DFT_UPR_MODEL@)
  88.  
  89. LD        = @LD@
  90. LINK        = @LINK_PROGS@ $(LIBTOOL) $(CC)
  91. LDFLAGS        = @EXTRA_LDFLAGS@ \
  92.         @PROG_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@
  93.  
  94. LDFLAGS_LIBTOOL    = $(LDFLAGS)
  95. LDFLAGS_NORMAL    = $(LDFLAGS)
  96. LDFLAGS_DEBUG    = $(LDFLAGS) @CC_G_OPT@
  97. LDFLAGS_PROFILE    = $(LDFLAGS) -pg
  98. LDFLAGS_SHARED    = $(LDFLAGS) @LD_SHARED_OPTS@
  99.  
  100. LDFLAGS_DEFAULT    = $(LDFLAGS_@DFT_UPR_MODEL@)
  101.  
  102. LINT        = @LINT@
  103. LINT_OPTS    = @LINT_OPTS@
  104. LINT_LIBS    = -lncurses @LIBS@
  105.  
  106. AUTO_SRC = \
  107.     termsort.c \
  108.     transform.h
  109.  
  110. # tic and toe rely on direct access to the terminfo database
  111. GET_PROGS = infocmp$x clear$x tput$x tset$x
  112. PUT_PROGS = @MAKE_TERMINFO@ tic$x toe$x
  113. PROGS = $(PUT_PROGS) $(GET_PROGS)
  114.  
  115. TESTPROGS = mvcur$x tctest$x hardscroll$x hashmap$x
  116.  
  117. # Default library, for linking applications
  118. DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
  119.  
  120. ################################################################################
  121. all:        $(AUTO_SRC) $(PROGS)
  122.  
  123. sources:    $(AUTO_SRC)
  124.  
  125. install:     $(AUTO_SRC) install.progs
  126. uninstall: uninstall.progs
  127.  
  128. # this line simplifies the configure-script
  129. libs \
  130. install.libs \
  131. uninstall.libs:
  132.  
  133. TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/'
  134.  
  135. actual_captoinfo = `echo captoinfo$x| $(TRANSFORM)`
  136. actual_clear     = `echo clear$x|     $(TRANSFORM)`
  137. actual_infocmp   = `echo infocmp$x|   $(TRANSFORM)`
  138. actual_infotocap = `echo infotocap$x| $(TRANSFORM)`
  139. actual_init      = `echo init$x|      $(TRANSFORM)`
  140. actual_reset     = `echo reset$x|     $(TRANSFORM)`
  141. actual_tic       = `echo tic$x|       $(TRANSFORM)`
  142. actual_toe       = `echo toe$x|       $(TRANSFORM)`
  143. actual_tput      = `echo tput$x|      $(TRANSFORM)`
  144. actual_tset      = `echo tset$x|      $(TRANSFORM)`
  145.  
  146. transform.h :
  147.     echo "#define PROG_CAPTOINFO \"$(actual_captoinfo)\"" >$@
  148.     echo "#define PROG_INFOTOCAP \"$(actual_infotocap)\"" >>$@
  149.     echo "#define PROG_RESET     \"$(actual_reset)\""     >>$@
  150.     echo "#define PROG_INIT      \"$(actual_init)\""      >>$@
  151.  
  152. install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
  153. @MAKE_TERMINFO@    $(LIBTOOL) $(INSTALL_PROGRAM) tic$x     $(DESTDIR)$(bindir)/$(actual_tic)
  154. @MAKE_TERMINFO@    $(LIBTOOL) $(INSTALL_PROGRAM) toe$x     $(DESTDIR)$(bindir)/$(actual_toe)
  155. @MAKE_TERMINFO@    @echo "linking $(actual_infotocap) to $(actual_tic)"
  156. @MAKE_TERMINFO@    -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
  157. @MAKE_TERMINFO@    (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_infotocap))
  158. @MAKE_TERMINFO@    @echo "linking $(actual_captoinfo) to $(actual_tic)"
  159. @MAKE_TERMINFO@    -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
  160. @MAKE_TERMINFO@    (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo))
  161.     $(LIBTOOL) $(INSTALL_PROGRAM) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp)
  162.     $(LIBTOOL) $(INSTALL_PROGRAM) clear$x   $(DESTDIR)$(bindir)/$(actual_clear)
  163.     $(LIBTOOL) $(INSTALL_PROGRAM) tput$x    $(DESTDIR)$(bindir)/$(actual_tput)
  164.     $(LIBTOOL) $(INSTALL_PROGRAM) tset$x    $(DESTDIR)$(bindir)/$(actual_tset)
  165.     @echo "linking $(actual_reset) to $(actual_tset)"
  166.     -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
  167.     (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset))
  168.  
  169. uninstall.progs:
  170. @MAKE_TERMINFO@    -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_tic)
  171. @MAKE_TERMINFO@    -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_toe)
  172. @MAKE_TERMINFO@    -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
  173. @MAKE_TERMINFO@    -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
  174.     -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp)
  175.     -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_clear)
  176.     -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_tput)
  177.     -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/$(actual_tset)
  178.     -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
  179.  
  180. $(DESTDIR)$(bindir) :
  181.     sh $(srcdir)/../mkinstalldirs $@
  182.  
  183. #
  184. # Utilities normally built by make all start here
  185. #
  186.  
  187. DEPS_TIC = \
  188.     $(MODEL)/tic.o \
  189.     $(MODEL)/dump_entry.o
  190.  
  191. tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
  192.     @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
  193.  
  194. DEPS_TOE = \
  195.     $(MODEL)/toe.o \
  196.     $(MODEL)/dump_entry.o
  197.  
  198. toe$x: $(DEPS_TOE) $(DEPS_CURSES)
  199.     @ECHO_LINK@ $(LINK) $(DEPS_TOE) $(LDFLAGS_DEFAULT) -o $@
  200.  
  201. DEPS_CLEAR = \
  202.     $(MODEL)/clear.o
  203.  
  204. clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
  205.     @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@
  206.  
  207. DEPS_TPUT = \
  208.     $(MODEL)/tput.o
  209.  
  210. tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
  211.     @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
  212.  
  213. DEPS_INFOCMP = \
  214.     $(MODEL)/infocmp.o \
  215.     $(MODEL)/dump_entry.o
  216.  
  217. infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
  218.     @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@
  219.  
  220. DEPS_TSET = \
  221.     $(MODEL)/tset.o \
  222.     $(MODEL)/dump_entry.o
  223.  
  224. tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
  225.     @ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@
  226.  
  227. termsort.c: $(srcdir)/MKtermsort.sh
  228.     sh -c "$(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@" >$@
  229.  
  230. #
  231. # Utility productions start here
  232. #
  233.  
  234. tags:
  235.     ctags *.[ch]
  236.  
  237. @MAKE_UPPER_TAGS@TAGS:
  238. @MAKE_UPPER_TAGS@    etags *.[ch]
  239.  
  240. mostlyclean ::
  241.     -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
  242.     -rm -f $(TESTPROGS)
  243.  
  244. clean :: mostlyclean
  245.     -rm -f $(AUTO_SRC)
  246.     -rm -f $(PROGS)
  247.     -rm -rf .libs
  248.  
  249. distclean :: clean
  250.     -rm -f Makefile
  251.  
  252. realclean :: distclean
  253.  
  254. # These rules are used to allow "make -n" to work on a clean directory-tree
  255. ../include/hashsize.h \
  256. ../include/parametrized.h \
  257. ../include/term.h :
  258.     cd ../include; $(MAKE) $(CF_MFLAGS)
  259. $(DEPS_CURSES) :
  260.     cd ../ncurses; $(MAKE) $(CF_MFLAGS)
  261.  
  262. lint:
  263. @MAKE_TERMINFO@    $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
  264. @MAKE_TERMINFO@    $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
  265.     $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c                          $(LINT_LIBS)
  266.     $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
  267.     $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c                           $(LINT_LIBS)
  268.     $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c    $(srcdir)/dump_entry.c $(LINT_LIBS)
  269.  
  270. ###############################################################################
  271. # The remainder of this file is automatically generated during configuration
  272. ###############################################################################
  273.